//
//  YSUserManager.h
//  luGongPro
//
//  Created by 王庆学 on 2017/7/27.
//  Copyright © 2017年 王庆学. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Mantle/Mantle.h>
#import "YSUserFunds.h"
#import "YSBankCardModel.h"


typedef NS_ENUM(NSInteger, UserAccountType){
    UserAccountTypeGuest = 0, //游客
    UserAccountTypeView = 1 //登录
};

@interface YSUser : MTLModel <MTLJSONSerializing>

@property (nullable, nonatomic, copy) NSString *mobile;

@property (nullable, nonatomic, copy) NSString *headImgUrl;

@property (nullable, nonatomic, copy) NSString *loginAccount;

@property (nullable, nonatomic, copy) NSString *password;

@property (nullable, nonatomic, copy) NSString *token;

@property (nullable, nonatomic, copy) NSString *username;

@property (nullable, nonatomic, copy) NSString *bindingToken;

@property (nullable, nonatomic, copy) NSString *userId;

@property (nullable, nonatomic, copy) NSString *nickName;

@property (nullable, nonatomic, copy) NSString *userShortId;

@property (nullable, nonatomic, copy) NSString *isActive;

@property (nullable, nonatomic, copy) NSString *moneyPassword;

@property (nullable, nonatomic, copy) NSString *signStat;

@property (nonatomic, strong, nonnull) YSUserFunds *userFunds;

@end

@interface YSUserManager : NSObject

+ (nonnull instancetype) sharedManager;

@property (nullable, nonatomic, copy)NSString *deviceToken;

@property (nullable, nonatomic, copy)NSString *userTypeStr;

@property (nonatomic, assign) UserAccountType userType;

@property (nonnull, nonatomic, strong) YSUser *currentUser;

@property (nonatomic, assign) BOOL hasLogin;
@property (nonatomic, assign) BOOL hasTradeAccount;

@property (nonatomic, strong) YSBankCardModel *_Nullable bankModel;
@property (nonatomic, strong) NSArray *_Nullable arrayBankInfo;

//token验证
- (void)checkTokenByResponse:(id _Nullable )response;

@end
